﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class 管理员_登录_登录 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string id = TextBox1.Text.Trim();
        string ps = TextBox2.Text.Trim();
        Users tmp = new Users();
        tmp.id = id;
        tmp.ps = ps;
        int result = tmp.denglu(tmp);
        if (result > 0)
        {
            Session["tmpID"] = id;
            Response.Redirect("");
        }
        else
        {
            Response.Write("<script>alert(\"对不起，你输入的工号或密码有误！\")</script>");
        }
    }
}